//
//  UIView+Extension.swift
//  XiMa
//
//  Created by m2m on 2016/12/25.
//  Copyright © 2016年 M2Micro. All rights reserved.
//

import UIKit

//对UIView的扩展
extension UIView{

    var x:CGFloat {
        return self.frame.origin.x
    }

    var y:CGFloat {
        return self.frame.origin.y
    }

    var width:CGFloat {
        return self.frame.size.width
    }

    var height:CGFloat {
        return self.frame.size.height
    }

    var point:CGPoint {
        return self.frame.origin
    }

    var size:CGSize {
        return self.frame.size
    }

    var centerX:CGFloat {
        return self.center.x
    }

    var centerY:CGFloat {
        return self.center.y
    }



}
